trim function will not work